﻿//using System;
//using System.Collections.Generic;
//using System.IO;
//using System.Linq;
//using System.Text;

//using Microsoft.VisualStudio.TestTools.UnitTesting;

//using Pibby.Core.IO;
//using Pibby.Core.Playlist;
//using Pibby.Core.IntegrationTests.Stubs;

//namespace Pibby.Core.Tests
//{
//    [TestClass]
//    public class WindowsPlaylistTests : IntegrationBaseTestFixture
//    {
//        [TestMethod]
//        public void CanReadEmptyPlaylist()
//        {
//            WindowsPlaylistGenerator generator = new WindowsPlaylistGenerator();

//            generator.HowManyItems = 0;

//            MediaPlaylist playlist = WindowsPlaylistReader.LoadFrom(generator.ContentStream);

//            //Assert.IsEmpty(playlist.Items);
//        }

//        [TestMethod]
//        public void CanReadFromGeneratedPlaylist()
//        {
//            WindowsPlaylistGenerator generator = new WindowsPlaylistGenerator();

//            generator.HowManyItems = 3;

//            MediaPlaylist playlist = WindowsPlaylistReader.LoadFrom(generator.ContentStream);

//            Assert.AreEqual(3, playlist.Items.Count);
//        }

//        [TestMethod]
//        public void CanWriteAndWritePlaylist()
//        {
//            WindowsPlaylistGenerator generator = new WindowsPlaylistGenerator();

//            generator.HowManyItems = 10;

//            MediaPlaylist playlist = WindowsPlaylistReader.LoadFrom(generator.ContentStream);

//            StringBuilder builder = new StringBuilder ();

//            string folderPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
//            IFolder folder = new Folder(folderPath, 25, 0);

//            using (TextWriter writer = new StringWriter (builder))
//            {
//                WindowsPlaylistWriter.SaveTo (writer, playlist, folder);
//            }

//            using (TextReader reader = new StringReader (builder.ToString ()))
//            {
//                MediaPlaylist readPlaylist = WindowsPlaylistReader.LoadFrom (reader);

//                Assert.AreEqual(playlist.Items.Count, readPlaylist.Items.Count);
//            }

//        }
//    }
//}
